// 我是cart模块中的
import axios from 'axios'
const state = {
  tabellist: []
}
const mutations = {
  getalllist (state, data) {
    state.tabellist = data
  }
}
const getters = {

}
const actions = {
  async getlist (context) {
    const { data } = await axios.get('http://127.0.0.1:3000/products')
    context.commit('getalllist', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  getters,
  actions
}
